package cn.falcon.fmobi.console.requestparam;

import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.*;

/**
 * User: shirongkang
 * Date: 2017/9/22
 * Time: 17:33
 * Desc:列表查询条件
 */
public class Query extends AbstractPagingSortParam{

    private Integer advertiserId;

    private Integer promotionPlanId;

    private Integer campaignId;

    private Integer mediaId;

    private Integer spaceId;

    private String search;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull
    private Date startDate;
    @NotNull
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    public void setSearch(String search) {
        this.search = search;
    }

    public Map<String,Object> getSearch(){
        Map<String,Object> map = new HashMap<>();
        map.put("search",this.search);
        map.put("adveristerId",this.advertiserId);
        map.put("startDate",this.startDate);
        map.put("endDate",this.endDate);
        return map;
    }

    public Integer getAdvertiserId() {
        return advertiserId;
    }

    public void setAdvertiserId(Integer advertiserId) {
        this.advertiserId = advertiserId;
    }

    public Integer getPromotionPlanId() {
        return promotionPlanId;
    }

    public void setPromotionPlanId(Integer promotionPlanId) {
        this.promotionPlanId = promotionPlanId;
    }

    public Integer getMediaId() {
        return mediaId;
    }

    public void setMediaId(Integer mediaId) {
        this.mediaId = mediaId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getSpaceId() {
        return spaceId;
    }

    public void setSpaceId(Integer spaceId) {
        this.spaceId = spaceId;
    }

    public Integer getCampaignId() {
        return campaignId;
    }

    public void setCampaignId(Integer campaignId) {
        this.campaignId = campaignId;
    }
}
